/*
 * @Author: LiMG
 * @Date: 2024-01-18 13:52:07
 * @Description: 文件描述
 */
import "./assets/main.css";
import { createApp } from "vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "./assets/iconfonts/iconfont.js";
import SvgIcon from "@/components/common/SvgIcon.vue";
import CommonDialog from "@/components/common/Dialog.vue";
// import Icons from "@element-plus/icons-vue";

// 引入状态管理
import { setupStore } from "@/store";
import App from "./App.vue";
import router from "./router";

const app = createApp(App);
setupStore(app);
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.use(router);
app.component("SvgIcon", SvgIcon);
app.component("CommonDialog", CommonDialog);
// for (const key in Icons) {
//     if (Icons.hasOwnProperty(key)) {
//         app.component(key, Icons[key]);
//     }
// }
app.mount("#app");
